package com.onepower.core.modules.service.impl;

import com.onepower.core.modules.repository.entity.SysUserRole;
import com.onepower.core.modules.repository.mapper.SysUserRoleMapper;
import com.onepower.core.modules.service.ISysUserRoleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 用户和角色关联表 服务实现类
 * </p>
 *
 * @author kin
 * @since 2018-08-01
 */
@Service
public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUserRole> implements ISysUserRoleService {


    @Override
    public List<String> getRoleByUser(Integer userId) {
        return baseMapper.selectRolesByUser(userId);
    }
}
